<template>
	<view class="container">
		<view class="line"></view>
		<view class="workerlist">
			<scroll-view scroll-y="true" style="width: 100%;":style="{height:scrollviewHeight+'rpx'}">
				<view class="workeritem" >
					<image src="/static/1018.png" mode="" @tap="openWorkitemPopup()"></image>
					<view class="workitem-right">
						<view class="workname-info">
							<text class="texts">姓名：翁斐然</text>
							<view class="bzj-tag">
								<text>保证金300元</text>
							</view>
						</view>
						<view class="workertypes">
							<text class="texts">擅长：砸墙、防水、开锁</text>
						</view>
						<view class="workerprice-ck">
							<text class="texts">本地参考价:<text style="color: red;">100</text>/天</text>
							<text class="worker-distance">距离2.8km</text>
						</view>
						<!-- <view class="worker-rates" v-if="workeritem.starCount">
							<u-rate :disabled="true" v-model="workeritem.starCount" size="23" active-color="rgba(255, 158, 93, 1)"></u-rate>
							<text class="rate-text">{{Number(workeritem.starCount).toFixed(1)}}分</text>
							<text class="commitmany">{{workeritem.numberOfComments}}条评论</text>
						</view> -->
						<view class="worker-rates">
							<u-rate :disabled="true" v-model="ratecount" size="23" active-color="rgba(255, 158, 93, 1)"></u-rate>
							<text class="rate-text">{{ratecount.toFixed(1)}}分</text>
							<text class="commitmany">30条评论</text>
						</view>
						<view class="rates-null">
							<text>暂无评分</text>
						</view>
					</view>
				</view>
			</scroll-view>
		</view>
		<u-popup v-model="showWorkeritemPopup" mode="center" width="710" border-radius="15">
			    <view class="popupview">
					<view class="workeritem">
						<image src="/static/1018.png" mode=""></image>
						<view class="workitem-right">
							<view class="workname-info">
								<text class="texts">姓名：翁斐然</text>
								<view class="bzj-tag">
									<text>保证金300元</text>
								</view>
							</view>
							<view class="workertypes">
								<text class="texts">擅长：砸墙、防水、开锁</text>
							</view>
							<view class="workerprice-ck">
								<text class="texts">本地参考价:<text style="color: red;">100</text>/天</text>
								<text class="worker-distance">距离2.8km</text>
							</view>
							<!-- <view class="worker-rates" v-if="workeritem.starCount">
								<u-rate :disabled="true" v-model="workeritem.starCount" size="23" active-color="rgba(255, 158, 93, 1)"></u-rate>
								<text class="rate-text">{{Number(workeritem.starCount).toFixed(1)}}分</text>
								<text class="commitmany">{{workeritem.numberOfComments}}条评论</text>
							</view> -->
							<view class="worker-rates">
								<u-rate :disabled="true" v-model="ratecount" size="23" active-color="rgba(255, 158, 93, 1)"></u-rate>
								<text class="rate-text">{{ratecount.toFixed(1)}}分</text>
								<text class="commitmany">30条评论</text>
							</view>
							<view class="rates-null">
								<text>暂无评分</text>
							</view>
						</view>
					</view>
					<view class="workeropers">
						<view class="">
							<u-icon name="/static/icon_kf_48.png" size="28"></u-icon>
							<text>客服</text>
						</view>
						<view class="">
							<u-icon name="/static/icon_dh_49.png" size="28"></u-icon>
							<text>电话</text>
						</view>
					</view>
			    </view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				scrollviewHeight:0,
				ratecount:5,
				showWorkeritemPopup:false,
			}
		},
		created() {
			this.scrollviewHeight = uni.getSystemInfoSync().windowHeight/uni.getSystemInfoSync().windowWidth*750-15;
		},
		methods: {
			openWorkitemPopup(){
				this.showWorkeritemPopup=true;
			}
		}
	}
</script>

<style lang="scss">
    page{
		width: 100%;
		height: 100%;
	}
	.container{
		width: 100%;
		height: 100%;
		.line{width: 100%;height: 15rpx;background-color: rgba(244, 248, 251, 1);}
		.workerlist{
		   width: 100%;
		   height: auto;
		}
		.workeritem{
			width:680rpx;
			height: auto;
			padding-bottom: 20rpx;
			padding-top: 20rpx;
			border-bottom: 1rpx solid #F1F1F1;
			margin: auto;
			display: flex;
			image{width:240rpx;height: 240rpx;border-radius: 10rpx;}
			.workitem-right{display: flex;flex-wrap: wrap;flex: 1;margin-left: 20rpx;align-items: center;}
			.workname-info{
				display: flex;
				justify-content: space-between;
				height: auto;
				align-items: center;
				width:100%;
				.texts{font-size: 28rpx;color: rgba(34, 34, 34, 1);}
				.bzj-tag{background-color: rgba(255, 158, 93, 1);color: #FFFFFF;font-size: 23rpx;padding-left:10rpx;padding-right:10rpx;text-align: center;padding-top:8rpx;padding-bottom: 8rpx;border-radius: 10rpx;}
			}
			.workertypes{width:100%;height: auto;display: flex;align-items: center;}
			.workerprice-ck{width: 100%;height: auto;display: flex;justify-content: space-between;align-items: center;}
			.worker-distance{color: rgba(136, 136, 136, 1);font-size: 25rpx;}
			.worker-rates{width: 100%;height: auto;display: flex;align-items: center;}
			.rate-text,.commitmany{font-size: 25rpx;color: rgba(136, 136, 136, 1);margin-left: 10rpx;}
			.rates-null{width: 100%;height: auto;display: flex;font-size: 25rpx;color: #808080;}
		}
		.popupview{
			width: 680rpx;
			margin: auto;
			height: auto;
			.workeropers{
				width: 100%;
				display: flex;
				justify-content: flex-end;
				align-items: center;
				height: 80rpx;
				view{
					display: flex;
					align-items: center;
					font-size: 25rpx;
					margin-left: 15rpx;
					text{margin-left: 15rpx;}
				}
			}
		}
	}
</style>
